﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace UFSSClasses
{
    class User
    {
        private string _username;
        private string _password;
        private int _userid;

        public bool Authenticate(string username, string password)
        {

            if (UserAccess.login(username,password)!="Failed")
                if (TokenHandler.AddToken(DBAccess.getUserID(username)))
                {
                    _username = username;
                    _password = password;
                    
                    return true;
                }
            return false;
            
        }

    }
}
